package com.atguigu.gmall.cart;

import com.atguigu.gmall.common.interceptor.FeignInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @Description: TODO
 * @Author: Mr.Cao
 * @DateTime: 2021/10/11 20:03
 * BMW F750GS
 **/
@SpringBootApplication
@ComponentScan(basePackages = "com.atguigu.gmall")
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.atguigu.gmall")
@EnableAsync //开启异步注解
public class ServiceCart8201 {
    public static void main(String[] args) {
        SpringApplication.run(ServiceCart8201.class,args);
    }
    @Bean
    public FeignInterceptor feignInterceptor(){
        return new FeignInterceptor();
    }
}
